package com.gary.vueblog.entity;

import lombok.*;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * (MUser)实体类
 *
 * @author makejava
 * @since 2020-12-08 10:17:24
 */
@AllArgsConstructor
@NoArgsConstructor
@Getter
@Setter
@ToString
@Builder
public class MUser implements Serializable {
    private static final long serialVersionUID = 230854467592064758L;
    /**
     * 主键id
     */
    private Long id;
    /**
     * 用户名
     */
    @NotBlank(message = "用户名不能为空")
    private String username;
    /**
     * 头像地址
     */
    private String avatar;
    /**
     * 邮箱
     */
    @NotBlank(message = "邮箱不能为空")
    @Email(message = "非邮箱格式")
    private String email;
    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空")
    private String password;
    /**
     * 用户状态
     */
    private Integer status;
    /**
     * 用户创建时间
     */
    private LocalDateTime created;
    /**
     * 用户最后一次登录时间
     */
    private LocalDateTime lastLogin;


}